import request from '@/utils/request';

//获取课程学员分页列表
export function getCourseStudyPageList(data) {
	return request({
		method: 'get',
		url: '/sysCourseStudent/query',
		params: data
	})
}

//注册课程学员
export function registerCourseStudy(data) {
	return request({
		method: 'post',
		url: '/sysCourseStudent/add',
		data
	})
}

//修改课程学员
export function updateCourseStudy(data) {
	return request({
		method: 'post',
		url: '/sysCourseStudent/update',
		data
	})
}

//删除课程学员
export function deleteCourseStudy(id) {
	return request({
		method: 'get',
		url: '/sysCourseStudent/delete/' + id
	})
}

//获取课程学员
export function getCourseStudy(id) {
	return request({
		method: 'get',
		url: '/sysCourseStudent/query/' + id
	})
}

//判断学员是否注册课程
export function isRegisterCourseStudy(courseId) {
	return request({
		method: 'get',
		url: '/sysCourseStudent/queryOne/' + courseId
	})
}